package com.example.controller;

import com.example.entity.Author;
import com.example.entity.Book;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RestController;

/**数据预处理
 * @author wuyuhong
 * @date 2021/06/08 22:39
 **/
@RestController
public class BookController  {
@GetMapping("/book")
    public void addBook(@ModelAttribute("b") Book book,@ModelAttribute("a") Author author){
    System.out.println("book===>"+book);
    System.out.println("author==>"+author);

}

}
